import java.util.LinkedList;

public class PlayerManager {
	private int					m_currentPlayer	= 0;
	private LinkedList<Player>	PlayerList;

	public LinkedList<Player> getPlayerList() {
		return PlayerList;
	}

	// handle player states
	public void ChangeState(Player a_Player) {
//		a_Player.PreviousState = a_Player.CurrentState;
//		a_Player.PreviousState.Exit();
//		a_Player.CurrentState.Enter();
	}

	public void ChangeCurrentState(StateBase newState) {
//		PlayerList.get(m_currentPlayer).PreviousState = PlayerList;
//		PlayerList.get(m_currentPlayer).CurrentState;
//		PlayerList.get(m_currentPlayer).PreviousState.Exit();
//		PlayerList.get(m_currentPlayer).CurrentState = newState;
//		PlayerList.get(m_currentPlayer).CurrentState.Enter();
	}

	public void ChangePreviousState() {
//		PlayerList.get(m_currentPlayer).CurrentState.Exit();
//		PlayerList.get(m_currentPlayer).CurrentState = PlayerList;
//		PlayerList.get(m_currentPlayer).PreviousState;
//		PlayerList.get(m_currentPlayer).CurrentState.Enter();
	}

	// generate player list from currentPlayer number
	public static void PopulatePlayerList() {
		int a_num = 4;// temporary number to represent number of players from
		// options
		for (int i = 0; i < a_num; i++) {
			Player newPlayer = new Player();// new Player(i, 3500, "Bob");

			newPlayer.setCash(3500);
			newPlayer.setName("Bob");
			newPlayer.setID(i);
			newPlayer.setDay(1);

			double locX = ((((newPlayer.getDay() - 1) % 7) * (2.85)) - 12.5);
			double locY = (8 - (((newPlayer.getDay() - 1) / 7) * 4.05));
			newPlayer.setMapX(locX);
			newPlayer.setMapY(locY);
//			newPlayer.CurrentState = InitialLoad.Instance();
//			PlayerList.push_back(newPlayer);
		}
	}

	public void SetCurrentPlayerTurn(int playerID) {
		m_currentPlayer = playerID;
	}

	public int GetCurrentPlayerTurn() {
		return m_currentPlayer;
	}

	// gameloops processes for player state
	public static void Draw() {

	}

	public static void Update() {

	}

}
